package com.tc.dispatch.gsservice.test;

import com.tc.dispatch.gsservice.ejb.*;
import javax.naming.*;
import javax.rmi.PortableRemoteObject;
import com.tc.dispatch.gsservice.model.PeiFangPrice;
import java.util.HashMap;
import com.tc.dispatch.gsservice.model.DianDuPrice;
import java.util.List;
import java.util.Date;
import com.tc.dispatch.gsservice.model.ExRate;
import com.tc.dispatch.gsservice.model.ProcessStep;
import com.tc.dispatch.gsservice.model.OrderSumMain;
import com.tc.dispatch.gsservice.model.OrderSumSub;
import com.tc.dispatch.gsservice.model.WorkflowStepRelation;
import com.tc.dispatch.gsservice.model.SpecType;
import com.tc.dispatch.gsservice.model.OutProcess;
import com.tc.dispatch.gsalgorithm.spec.spec;
import com.tc.dispatch.gsservice.filter.GsFilter;
import com.tc.dispatch.gsservice.model.ProcessFee;
import com.tc.dispatch.gsservice.model.ProcessYield;
import com.tc.dispatch.gsservice.model.ProcessName;
import com.tc.dispatch.gsservice.model.ProcessArea;
import com.tc.dispatch.gsservice.model.ProcessFlow;
import com.tc.dispatch.gsservice.model.ProcessGate;
import com.tc.dispatch.gsservice.model.OtherConstants;
import com.tc.dispatch.gsservice.model.SsignDensity;
import com.tc.dispatch.gsservice.model.DefaultCheck;
import com.tc.dispatch.gsservice.model.QianDaoYield;
import com.tc.dispatch.gsservice.action.GSCalcAction;

public class GSServiceTestClient3 extends Object {
  private static final String ERROR_NULL_REMOTE = "Remote interface reference is null.  It must be created by calling one of the Home interface methods first.";
  private static final int MAX_OUTPUT_LINE_LENGTH = 100;
  private boolean logging = true;
  private GSServiceHome gSServiceHome = null;
  private GSService gSService = null;

  //Construct the EJB test client
  public GSServiceTestClient3() {
    initialize();
    create();
    this.testLog();
  }

  public void initialize() {
    long startTime = 0;
    if (logging) {
      log("Initializing bean access.");
      startTime = System.currentTimeMillis();
    }

    try {
      //get naming context
      Context context = new InitialContext();

      //look up jndi name
      Object ref = context.lookup("GSService");
      //look up jndi name and cast to Home interface
      gSServiceHome = (GSServiceHome) PortableRemoteObject.narrow(ref, GSServiceHome.class);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded initializing bean access through Home interface.");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed initializing bean access.");
      }
      e.printStackTrace();
    }
  }

  //----------------------------------------------------------------------------
  // Methods that use Home interface methods to generate a Remote interface reference
  //----------------------------------------------------------------------------

  public GSService create() {
    long startTime = 0;
    if (logging) {
      log("Calling create()");
      startTime = System.currentTimeMillis();
    }
    try {
      gSService = gSServiceHome.create();
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: create()");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: create()");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from create(): " + gSService + ".");
    }
    return gSService;
  }

  //----------------------------------------------------------------------------
  // Methods that use Remote interface methods to access data through the bean
  //----------------------------------------------------------------------------

  public PeiFangPrice getPeiFangPrice(int fac, String ssign, int month1, int year1) {
    PeiFangPrice returnValue = null;

    if (gSService == null) {
      System.out.println("Error in getPeiFangPrice(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getPeiFangPrice(" + fac + ", " + ssign + ", " + month1 + ", " + year1 + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getPeiFangPrice(fac, ssign, month1, year1);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getPeiFangPrice(" + fac + ", " + ssign + ", " + month1 + ", " + year1 + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getPeiFangPrice(" + fac + ", " + ssign + ", " + month1 + ", " + year1 + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getPeiFangPrice(" + fac + ", " + ssign + ", " + month1 + ", " + year1 + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public HashMap getWeight() {
    HashMap returnValue = null;

    if (gSService == null) {
      System.out.println("Error in getWeight(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getWeight()");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getWeight();
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getWeight()");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getWeight()");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getWeight(): " + returnValue + ".");
    }
    return returnValue;
  }

  public void setWeight(HashMap hs) {
    if (gSService == null) {
      System.out.println("Error in setWeight(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling setWeight(" + hs + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.setWeight(hs);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: setWeight(" + hs + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: setWeight(" + hs + ")");
      }
      e.printStackTrace();
    }
  }

  public DianDuPrice getDianDu(String wherestr) {
    DianDuPrice returnValue = null;

    if (gSService == null) {
      System.out.println("Error in getDianDu(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getDianDu(" + wherestr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getDianDu(wherestr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getDianDu(" + wherestr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getDianDu(" + wherestr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getDianDu(" + wherestr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public void updateDianDu(DianDuPrice dd) {
    if (gSService == null) {
      System.out.println("Error in updateDianDu(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling updateDianDu(" + dd + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.updateDianDu(dd);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: updateDianDu(" + dd + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: updateDianDu(" + dd + ")");
      }
      e.printStackTrace();
    }
  }

  public void removeDianDu(String plate) {
    if (gSService == null) {
      System.out.println("Error in removeDianDu(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling removeDianDu(" + plate + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.removeDianDu(plate);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: removeDianDu(" + plate + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: removeDianDu(" + plate + ")");
      }
      e.printStackTrace();
    }
  }

  public List findDianDu(String wherestr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findDianDu(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findDianDu(" + wherestr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findDianDu(wherestr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findDianDu(" + wherestr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findDianDu(" + wherestr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findDianDu(" + wherestr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public String createDianDu(DianDuPrice dd) {
    String returnValue = "";

    if (gSService == null) {
      System.out.println("Error in createDianDu(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling createDianDu(" + dd + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.createDianDu(dd);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: createDianDu(" + dd + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: createDianDu(" + dd + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from createDianDu(" + dd + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List getFinishedPro(Date date1, Date date2, String sort) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in getFinishedPro(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getFinishedPro(" + date1 + ", " + date2 + ", " + sort + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getFinishedPro(date1, date2, sort);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getFinishedPro(" + date1 + ", " + date2 + ", " + sort + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getFinishedPro(" + date1 + ", " + date2 + ", " + sort + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getFinishedPro(" + date1 + ", " + date2 + ", " + sort + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List getFinishedPro(String ssign, String spec, String plate, Date date1, Date date2) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in getFinishedPro(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getFinishedPro(" + ssign + ", " + spec + ", " + plate + ", " + date1 + ", " + date2 + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getFinishedPro(ssign, spec, plate, date1, date2);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getFinishedPro(" + ssign + ", " + spec + ", " + plate + ", " + date1 + ", " + date2 + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getFinishedPro(" + ssign + ", " + spec + ", " + plate + ", " + date1 + ", " + date2 + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getFinishedPro(" + ssign + ", " + spec + ", " + plate + ", " + date1 + ", " + date2 + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public String createHuilv(ExRate exrate) {
    String returnValue = "";

    if (gSService == null) {
      System.out.println("Error in createHuilv(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling createHuilv(" + exrate + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.createHuilv(exrate);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: createHuilv(" + exrate + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: createHuilv(" + exrate + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from createHuilv(" + exrate + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public void updateHuilv(ExRate exrate) {
    if (gSService == null) {
      System.out.println("Error in updateHuilv(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling updateHuilv(" + exrate + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.updateHuilv(exrate);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: updateHuilv(" + exrate + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: updateHuilv(" + exrate + ")");
      }
      e.printStackTrace();
    }
  }

  public void removeHuilv(String name) {
    if (gSService == null) {
      System.out.println("Error in removeHuilv(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling removeHuilv(" + name + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.removeHuilv(name);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: removeHuilv(" + name + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: removeHuilv(" + name + ")");
      }
      e.printStackTrace();
    }
  }

  public List findHuilv(String wherestr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findHuilv(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findHuilv(" + wherestr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findHuilv(wherestr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findHuilv(" + wherestr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findHuilv(" + wherestr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findHuilv(" + wherestr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public int createProcessStep(ProcessStep ps) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in createProcessStep(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling createProcessStep(" + ps + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.createProcessStep(ps);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: createProcessStep(" + ps + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: createProcessStep(" + ps + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from createProcessStep(" + ps + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public void removeProcessStep(int id) {
    if (gSService == null) {
      System.out.println("Error in removeProcessStep(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling removeProcessStep(" + id + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.removeProcessStep(id);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: removeProcessStep(" + id + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: removeProcessStep(" + id + ")");
      }
      e.printStackTrace();
    }
  }

  public void updateProcessStep(ProcessStep ps) {
    if (gSService == null) {
      System.out.println("Error in updateProcessStep(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling updateProcessStep(" + ps + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.updateProcessStep(ps);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: updateProcessStep(" + ps + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: updateProcessStep(" + ps + ")");
      }
      e.printStackTrace();
    }
  }

  public List findProcessStep(String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findProcessStep(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findProcessStep(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findProcessStep(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findProcessStep(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findProcessStep(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findProcessStep(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public int createOrderSumMain(OrderSumMain osm) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in createOrderSumMain(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling createOrderSumMain(" + osm + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.createOrderSumMain(osm);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: createOrderSumMain(" + osm + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: createOrderSumMain(" + osm + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from createOrderSumMain(" + osm + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public void removeOrderSumMain(int id) {
    if (gSService == null) {
      System.out.println("Error in removeOrderSumMain(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling removeOrderSumMain(" + id + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.removeOrderSumMain(id);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: removeOrderSumMain(" + id + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: removeOrderSumMain(" + id + ")");
      }
      e.printStackTrace();
    }
  }

  public void updateOrderSumMain(OrderSumMain osm) {
    if (gSService == null) {
      System.out.println("Error in updateOrderSumMain(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling updateOrderSumMain(" + osm + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.updateOrderSumMain(osm);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: updateOrderSumMain(" + osm + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: updateOrderSumMain(" + osm + ")");
      }
      e.printStackTrace();
    }
  }

  public List findOrderSumMain(String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findOrderSumMain(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findOrderSumMain(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findOrderSumMain(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findOrderSumMain(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findOrderSumMain(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findOrderSumMain(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public int createOrderSumSub(OrderSumSub oss) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in createOrderSumSub(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling createOrderSumSub(" + oss + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.createOrderSumSub(oss);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: createOrderSumSub(" + oss + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: createOrderSumSub(" + oss + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from createOrderSumSub(" + oss + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public void removeOrderSumSub(int id) {
    if (gSService == null) {
      System.out.println("Error in removeOrderSumSub(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling removeOrderSumSub(" + id + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.removeOrderSumSub(id);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: removeOrderSumSub(" + id + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: removeOrderSumSub(" + id + ")");
      }
      e.printStackTrace();
    }
  }

  public void updateOrderSumSub(OrderSumSub oss) {
    if (gSService == null) {
      System.out.println("Error in updateOrderSumSub(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling updateOrderSumSub(" + oss + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.updateOrderSumSub(oss);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: updateOrderSumSub(" + oss + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: updateOrderSumSub(" + oss + ")");
      }
      e.printStackTrace();
    }
  }

  public List findOrderSumSub(String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findOrderSumSub(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findOrderSumSub(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findOrderSumSub(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findOrderSumSub(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findOrderSumSub(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findOrderSumSub(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List findOrderSumSubByPages(int page, int pagePerNum) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findOrderSumSubByPages(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findOrderSumSubByPages(" + page + ", " + pagePerNum + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findOrderSumSubByPages(page, pagePerNum);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findOrderSumSubByPages(" + page + ", " + pagePerNum + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findOrderSumSubByPages(" + page + ", " + pagePerNum + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findOrderSumSubByPages(" + page + ", " + pagePerNum + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List findOrderSumMainByPages(int page, int pagePerNum) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findOrderSumMainByPages(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findOrderSumMainByPages(" + page + ", " + pagePerNum + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findOrderSumMainByPages(page, pagePerNum);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findOrderSumMainByPages(" + page + ", " + pagePerNum + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findOrderSumMainByPages(" + page + ", " + pagePerNum + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findOrderSumMainByPages(" + page + ", " + pagePerNum + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List findProcessStepByPages(int page, int pagePerNum) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findProcessStepByPages(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findProcessStepByPages(" + page + ", " + pagePerNum + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findProcessStepByPages(page, pagePerNum);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findProcessStepByPages(" + page + ", " + pagePerNum + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findProcessStepByPages(" + page + ", " + pagePerNum + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findProcessStepByPages(" + page + ", " + pagePerNum + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public OrderSumMain getERPKaimo(OrderSumMain osm) {
    OrderSumMain returnValue = null;

    if (gSService == null) {
      System.out.println("Error in getERPKaimo(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getERPKaimo(" + osm + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getERPKaimo(osm);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getERPKaimo(" + osm + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getERPKaimo(" + osm + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getERPKaimo(" + osm + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public OrderSumMain getERPMaopi(OrderSumMain osm) {
    OrderSumMain returnValue = null;

    if (gSService == null) {
      System.out.println("Error in getERPMaopi(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getERPMaopi(" + osm + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getERPMaopi(osm);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getERPMaopi(" + osm + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getERPMaopi(" + osm + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getERPMaopi(" + osm + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List dealProcessList(List processList) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in dealProcessList(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling dealProcessList(" + processList + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.dealProcessList(processList);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: dealProcessList(" + processList + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: dealProcessList(" + processList + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from dealProcessList(" + processList + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public Float getYield(String whereStr, String ssign, String spec, String plate, int month1, int year1, int factory) {
    Float returnValue = null;

    if (gSService == null) {
      System.out.println("Error in getYield(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getYield(" + whereStr + ", " + ssign + ", " + spec + ", " + plate + ", " + month1 + ", " + year1 + ", " + factory + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getYield(whereStr, ssign, spec, plate, month1, year1, factory);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getYield(" + whereStr + ", " + ssign + ", " + spec + ", " + plate + ", " + month1 + ", " + year1 + ", " + factory + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getYield(" + whereStr + ", " + ssign + ", " + spec + ", " + plate + ", " + month1 + ", " + year1 + ", " + factory + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getYield(" + whereStr + ", " + ssign + ", " + spec + ", " + plate + ", " + month1 + ", " + year1 + ", " + factory + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public int getOSMTotalNum(String whereStr) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in getOSMTotalNum(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getOSMTotalNum(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getOSMTotalNum(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getOSMTotalNum(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getOSMTotalNum(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getOSMTotalNum(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public int getOSSTotalNum(String whereStr) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in getOSSTotalNum(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getOSSTotalNum(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getOSSTotalNum(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getOSSTotalNum(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getOSSTotalNum(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getOSSTotalNum(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public int getPSTotalNum(String whereStr) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in getPSTotalNum(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getPSTotalNum(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getPSTotalNum(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getPSTotalNum(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getPSTotalNum(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getPSTotalNum(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List findDianDuPriceByPages(int start, int limit) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findDianDuPriceByPages(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findDianDuPriceByPages(" + start + ", " + limit + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findDianDuPriceByPages(start, limit);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findDianDuPriceByPages(" + start + ", " + limit + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findDianDuPriceByPages(" + start + ", " + limit + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findDianDuPriceByPages(" + start + ", " + limit + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public int getDDTotalNum(String whereStr) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in getDDTotalNum(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getDDTotalNum(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getDDTotalNum(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getDDTotalNum(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getDDTotalNum(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getDDTotalNum(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public String findERPKaiMo(String salesid) {
    String returnValue = "";

    if (gSService == null) {
      System.out.println("Error in findERPKaiMo(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findERPKaiMo(" + salesid + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findERPKaiMo(salesid);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findERPKaiMo(" + salesid + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findERPKaiMo(" + salesid + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findERPKaiMo(" + salesid + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List findOrderSumMainByPagesWhere(int page, int pagePerNum, String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findOrderSumMainByPagesWhere(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findOrderSumMainByPagesWhere(" + page + ", " + pagePerNum + ", " + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findOrderSumMainByPagesWhere(page, pagePerNum, whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findOrderSumMainByPagesWhere(" + page + ", " + pagePerNum + ", " + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findOrderSumMainByPagesWhere(" + page + ", " + pagePerNum + ", " + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findOrderSumMainByPagesWhere(" + page + ", " + pagePerNum + ", " + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public int createWorkflowStepRelation(WorkflowStepRelation wsr) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in createWorkflowStepRelation(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling createWorkflowStepRelation(" + wsr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.createWorkflowStepRelation(wsr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: createWorkflowStepRelation(" + wsr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: createWorkflowStepRelation(" + wsr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from createWorkflowStepRelation(" + wsr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public void updateWorkflowStepRelation(WorkflowStepRelation wsr) {
    if (gSService == null) {
      System.out.println("Error in updateWorkflowStepRelation(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling updateWorkflowStepRelation(" + wsr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.updateWorkflowStepRelation(wsr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: updateWorkflowStepRelation(" + wsr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: updateWorkflowStepRelation(" + wsr + ")");
      }
      e.printStackTrace();
    }
  }

  public void removeWorkflowStepRelation(int id) {
    if (gSService == null) {
      System.out.println("Error in removeWorkflowStepRelation(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling removeWorkflowStepRelation(" + id + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.removeWorkflowStepRelation(id);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: removeWorkflowStepRelation(" + id + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: removeWorkflowStepRelation(" + id + ")");
      }
      e.printStackTrace();
    }
  }

  public List findWorkflowStepRelation(String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findWorkflowStepRelation(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findWorkflowStepRelation(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findWorkflowStepRelation(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findWorkflowStepRelation(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findWorkflowStepRelation(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findWorkflowStepRelation(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List findWorkflowStepRelationByPage(int start, int limit, String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findWorkflowStepRelationByPage(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findWorkflowStepRelationByPage(" + start + ", " + limit + ", " + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findWorkflowStepRelationByPage(start, limit, whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findWorkflowStepRelationByPage(" + start + ", " + limit + ", " + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findWorkflowStepRelationByPage(" + start + ", " + limit + ", " + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findWorkflowStepRelationByPage(" + start + ", " + limit + ", " + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public int getWSRtTotalNums(String whereStr) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in getWSRtTotalNums(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getWSRtTotalNums(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getWSRtTotalNums(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getWSRtTotalNums(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getWSRtTotalNums(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getWSRtTotalNums(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public boolean testSearchSql(String whereStr, String map, String workflow) {
    boolean returnValue = false;

    if (gSService == null) {
      System.out.println("Error in testSearchSql(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling testSearchSql(" + whereStr + ", " + map + ", " + workflow + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.testSearchSql(whereStr, map, workflow);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: testSearchSql(" + whereStr + ", " + map + ", " + workflow + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: testSearchSql(" + whereStr + ", " + map + ", " + workflow + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from testSearchSql(" + whereStr + ", " + map + ", " + workflow + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public int createSpecType(SpecType stype) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in createSpecType(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling createSpecType(" + stype + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.createSpecType(stype);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: createSpecType(" + stype + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: createSpecType(" + stype + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from createSpecType(" + stype + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public void updateSpecType(SpecType stype) {
    if (gSService == null) {
      System.out.println("Error in updateSpecType(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling updateSpecType(" + stype + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.updateSpecType(stype);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: updateSpecType(" + stype + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: updateSpecType(" + stype + ")");
      }
      e.printStackTrace();
    }
  }

  public void removeSpecType(int id) {
    if (gSService == null) {
      System.out.println("Error in removeSpecType(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling removeSpecType(" + id + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.removeSpecType(id);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: removeSpecType(" + id + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: removeSpecType(" + id + ")");
      }
      e.printStackTrace();
    }
  }

  public List findSpecType(String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findSpecType(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findSpecType(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findSpecType(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findSpecType(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findSpecType(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findSpecType(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public int getSpecTypeTotalNums(String whereStr) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in getSpecTypeTotalNums(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getSpecTypeTotalNums(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getSpecTypeTotalNums(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getSpecTypeTotalNums(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getSpecTypeTotalNums(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getSpecTypeTotalNums(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List findSpecTypeByPage(int start, int limit, String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findSpecTypeByPage(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findSpecTypeByPage(" + start + ", " + limit + ", " + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findSpecTypeByPage(start, limit, whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findSpecTypeByPage(" + start + ", " + limit + ", " + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findSpecTypeByPage(" + start + ", " + limit + ", " + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findSpecTypeByPage(" + start + ", " + limit + ", " + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public int createOutProcess(OutProcess oprocess) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in createOutProcess(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling createOutProcess(" + oprocess + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.createOutProcess(oprocess);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: createOutProcess(" + oprocess + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: createOutProcess(" + oprocess + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from createOutProcess(" + oprocess + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public void updateOutProcess(OutProcess oprocess) {
    if (gSService == null) {
      System.out.println("Error in updateOutProcess(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling updateOutProcess(" + oprocess + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.updateOutProcess(oprocess);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: updateOutProcess(" + oprocess + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: updateOutProcess(" + oprocess + ")");
      }
      e.printStackTrace();
    }
  }

  public void removeOutProcess(int id) {
    if (gSService == null) {
      System.out.println("Error in removeOutProcess(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling removeOutProcess(" + id + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.removeOutProcess(id);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: removeOutProcess(" + id + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: removeOutProcess(" + id + ")");
      }
      e.printStackTrace();
    }
  }

  public List findOutProcess(String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findOutProcess(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findOutProcess(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findOutProcess(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findOutProcess(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findOutProcess(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findOutProcess(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public int getOutProcessTotalNums(String whereStr) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in getOutProcessTotalNums(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getOutProcessTotalNums(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getOutProcessTotalNums(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getOutProcessTotalNums(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getOutProcessTotalNums(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getOutProcessTotalNums(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List findOutProcessByPage(int start, int limit, String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findOutProcessByPage(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findOutProcessByPage(" + start + ", " + limit + ", " + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findOutProcessByPage(start, limit, whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findOutProcessByPage(" + start + ", " + limit + ", " + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findOutProcessByPage(" + start + ", " + limit + ", " + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findOutProcessByPage(" + start + ", " + limit + ", " + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public OutProcess getKnife(String specType, spec after, GsFilter gsf) {
    OutProcess returnValue = null;

    if (gSService == null) {
      System.out.println("Error in getKnife(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getKnife(" + specType + ", " + after + ", " + gsf + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getKnife(specType, after, gsf);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getKnife(" + specType + ", " + after + ", " + gsf + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getKnife(" + specType + ", " + after + ", " + gsf + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getKnife(" + specType + ", " + after + ", " + gsf + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public int createProcessFee(ProcessFee pfee) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in createProcessFee(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling createProcessFee(" + pfee + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.createProcessFee(pfee);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: createProcessFee(" + pfee + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: createProcessFee(" + pfee + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from createProcessFee(" + pfee + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public void updateProcessFee(ProcessFee pfee) {
    if (gSService == null) {
      System.out.println("Error in updateProcessFee(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling updateProcessFee(" + pfee + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.updateProcessFee(pfee);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: updateProcessFee(" + pfee + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: updateProcessFee(" + pfee + ")");
      }
      e.printStackTrace();
    }
  }

  public void removeProcessFee(int id) {
    if (gSService == null) {
      System.out.println("Error in removeProcessFee(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling removeProcessFee(" + id + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.removeProcessFee(id);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: removeProcessFee(" + id + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: removeProcessFee(" + id + ")");
      }
      e.printStackTrace();
    }
  }

  public int getProcessFeeTotalNums(String whereStr) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in getProcessFeeTotalNums(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getProcessFeeTotalNums(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getProcessFeeTotalNums(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getProcessFeeTotalNums(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getProcessFeeTotalNums(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getProcessFeeTotalNums(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List findProcessFeeByPage(int start, int limit, String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findProcessFeeByPage(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findProcessFeeByPage(" + start + ", " + limit + ", " + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findProcessFeeByPage(start, limit, whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findProcessFeeByPage(" + start + ", " + limit + ", " + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findProcessFeeByPage(" + start + ", " + limit + ", " + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findProcessFeeByPage(" + start + ", " + limit + ", " + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public ProcessFee getProcessFee(String whereStr, spec after) {
    ProcessFee returnValue = null;

    if (gSService == null) {
      System.out.println("Error in getProcessFee(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getProcessFee(" + whereStr + ", " + after + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getProcessFee(whereStr, after);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getProcessFee(" + whereStr + ", " + after + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getProcessFee(" + whereStr + ", " + after + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getProcessFee(" + whereStr + ", " + after + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public int createProcessYield(ProcessYield pyield) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in createProcessYield(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling createProcessYield(" + pyield + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.createProcessYield(pyield);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: createProcessYield(" + pyield + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: createProcessYield(" + pyield + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from createProcessYield(" + pyield + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public void updateProcessYield(ProcessYield pyield) {
    if (gSService == null) {
      System.out.println("Error in updateProcessYield(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling updateProcessYield(" + pyield + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.updateProcessYield(pyield);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: updateProcessYield(" + pyield + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: updateProcessYield(" + pyield + ")");
      }
      e.printStackTrace();
    }
  }

  public void removeProcessYield(int id) {
    if (gSService == null) {
      System.out.println("Error in removeProcessYield(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling removeProcessYield(" + id + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.removeProcessYield(id);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: removeProcessYield(" + id + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: removeProcessYield(" + id + ")");
      }
      e.printStackTrace();
    }
  }

  public int getProcessYieldTotalNums(String whereStr) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in getProcessYieldTotalNums(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getProcessYieldTotalNums(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getProcessYieldTotalNums(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getProcessYieldTotalNums(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getProcessYieldTotalNums(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getProcessYieldTotalNums(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List findProcessYieldByPage(int start, int limit, String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findProcessYieldByPage(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findProcessYieldByPage(" + start + ", " + limit + ", " + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findProcessYieldByPage(start, limit, whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findProcessYieldByPage(" + start + ", " + limit + ", " + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findProcessYieldByPage(" + start + ", " + limit + ", " + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findProcessYieldByPage(" + start + ", " + limit + ", " + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public ProcessYield getProcessYield(String whereStr, String procs) {
    ProcessYield returnValue = null;

    if (gSService == null) {
      System.out.println("Error in getProcessYield(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getProcessYield(" + whereStr + ", " + procs + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getProcessYield(whereStr, procs);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getProcessYield(" + whereStr + ", " + procs + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getProcessYield(" + whereStr + ", " + procs + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getProcessYield(" + whereStr + ", " + procs + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public int createProcessName(ProcessName pname) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in createProcessName(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling createProcessName(" + pname + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.createProcessName(pname);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: createProcessName(" + pname + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: createProcessName(" + pname + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from createProcessName(" + pname + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public void updateProcessName(ProcessName pname) {
    if (gSService == null) {
      System.out.println("Error in updateProcessName(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling updateProcessName(" + pname + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.updateProcessName(pname);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: updateProcessName(" + pname + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: updateProcessName(" + pname + ")");
      }
      e.printStackTrace();
    }
  }

  public void removeProcessName(int id) {
    if (gSService == null) {
      System.out.println("Error in removeProcessName(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling removeProcessName(" + id + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.removeProcessName(id);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: removeProcessName(" + id + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: removeProcessName(" + id + ")");
      }
      e.printStackTrace();
    }
  }

  public int getProcessNameTotalNums(String whereStr) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in getProcessNameTotalNums(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getProcessNameTotalNums(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getProcessNameTotalNums(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getProcessNameTotalNums(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getProcessNameTotalNums(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getProcessNameTotalNums(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List findProcessNameByPage(int start, int limit, String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findProcessNameByPage(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findProcessNameByPage(" + start + ", " + limit + ", " + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findProcessNameByPage(start, limit, whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findProcessNameByPage(" + start + ", " + limit + ", " + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findProcessNameByPage(" + start + ", " + limit + ", " + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findProcessNameByPage(" + start + ", " + limit + ", " + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public int createProcessArea(ProcessArea parea) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in createProcessArea(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling createProcessArea(" + parea + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.createProcessArea(parea);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: createProcessArea(" + parea + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: createProcessArea(" + parea + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from createProcessArea(" + parea + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public void updateProcessArea(ProcessArea parea) {
    if (gSService == null) {
      System.out.println("Error in updateProcessArea(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling updateProcessArea(" + parea + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.updateProcessArea(parea);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: updateProcessArea(" + parea + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: updateProcessArea(" + parea + ")");
      }
      e.printStackTrace();
    }
  }

  public void removeProcessArea(int id) {
    if (gSService == null) {
      System.out.println("Error in removeProcessArea(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling removeProcessArea(" + id + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.removeProcessArea(id);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: removeProcessArea(" + id + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: removeProcessArea(" + id + ")");
      }
      e.printStackTrace();
    }
  }

  public int getProcessAreaTotalNums(String whereStr) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in getProcessAreaTotalNums(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getProcessAreaTotalNums(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getProcessAreaTotalNums(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getProcessAreaTotalNums(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getProcessAreaTotalNums(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getProcessAreaTotalNums(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List findProcessAreaByPage(int start, int limit, String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findProcessAreaByPage(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findProcessAreaByPage(" + start + ", " + limit + ", " + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findProcessAreaByPage(start, limit, whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findProcessAreaByPage(" + start + ", " + limit + ", " + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findProcessAreaByPage(" + start + ", " + limit + ", " + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findProcessAreaByPage(" + start + ", " + limit + ", " + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public int createProcessFlow(ProcessFlow pflow) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in createProcessFlow(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling createProcessFlow(" + pflow + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.createProcessFlow(pflow);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: createProcessFlow(" + pflow + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: createProcessFlow(" + pflow + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from createProcessFlow(" + pflow + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public void updateProcessFlow(ProcessFlow pflow) {
    if (gSService == null) {
      System.out.println("Error in updateProcessFlow(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling updateProcessFlow(" + pflow + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.updateProcessFlow(pflow);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: updateProcessFlow(" + pflow + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: updateProcessFlow(" + pflow + ")");
      }
      e.printStackTrace();
    }
  }

  public void removeProcessFlow(int id) {
    if (gSService == null) {
      System.out.println("Error in removeProcessFlow(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling removeProcessFlow(" + id + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.removeProcessFlow(id);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: removeProcessFlow(" + id + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: removeProcessFlow(" + id + ")");
      }
      e.printStackTrace();
    }
  }

  public int getProcessFlowTotalNums(String whereStr) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in getProcessFlowTotalNums(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getProcessFlowTotalNums(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getProcessFlowTotalNums(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getProcessFlowTotalNums(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getProcessFlowTotalNums(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getProcessFlowTotalNums(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List findProcessFlowByPage(int start, int limit, String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findProcessFlowByPage(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findProcessFlowByPage(" + start + ", " + limit + ", " + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findProcessFlowByPage(start, limit, whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findProcessFlowByPage(" + start + ", " + limit + ", " + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findProcessFlowByPage(" + start + ", " + limit + ", " + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findProcessFlowByPage(" + start + ", " + limit + ", " + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public void updateProcessGate(ProcessGate pgate) {
    if (gSService == null) {
      System.out.println("Error in updateProcessGate(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling updateProcessGate(" + pgate + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.updateProcessGate(pgate);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: updateProcessGate(" + pgate + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: updateProcessGate(" + pgate + ")");
      }
      e.printStackTrace();
    }
  }

  public int getProcessGateTotalNums(String whereStr) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in getProcessGateTotalNums(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getProcessGateTotalNums(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getProcessGateTotalNums(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getProcessGateTotalNums(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getProcessGateTotalNums(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getProcessGateTotalNums(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List findProcessGateByPage(int start, int limit, String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findProcessGateByPage(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findProcessGateByPage(" + start + ", " + limit + ", " + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findProcessGateByPage(start, limit, whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findProcessGateByPage(" + start + ", " + limit + ", " + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findProcessGateByPage(" + start + ", " + limit + ", " + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findProcessGateByPage(" + start + ", " + limit + ", " + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public ProcessFlow getFlow(String spec) {
    ProcessFlow returnValue = null;

    if (gSService == null) {
      System.out.println("Error in getFlow(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getFlow(" + spec + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getFlow(spec);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getFlow(" + spec + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getFlow(" + spec + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getFlow(" + spec + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List findOtherConstants(String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findOtherConstants(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findOtherConstants(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findOtherConstants(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findOtherConstants(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findOtherConstants(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findOtherConstants(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List findOtherConstantsByPage(int start, int limit, String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findOtherConstantsByPage(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findOtherConstantsByPage(" + start + ", " + limit + ", " + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findOtherConstantsByPage(start, limit, whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findOtherConstantsByPage(" + start + ", " + limit + ", " + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findOtherConstantsByPage(" + start + ", " + limit + ", " + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findOtherConstantsByPage(" + start + ", " + limit + ", " + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public void updateOtherConstants(OtherConstants otherconstants) {
    if (gSService == null) {
      System.out.println("Error in updateOtherConstants(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling updateOtherConstants(" + otherconstants + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.updateOtherConstants(otherconstants);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: updateOtherConstants(" + otherconstants + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: updateOtherConstants(" + otherconstants + ")");
      }
      e.printStackTrace();
    }
  }

  public int getOtherCosntantsTotalNum(String whereStr) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in getOtherCosntantsTotalNum(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getOtherCosntantsTotalNum(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getOtherCosntantsTotalNum(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getOtherCosntantsTotalNum(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getOtherCosntantsTotalNum(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getOtherCosntantsTotalNum(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public int createSsignDensity(SsignDensity sd) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in createSsignDensity(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling createSsignDensity(" + sd + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.createSsignDensity(sd);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: createSsignDensity(" + sd + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: createSsignDensity(" + sd + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from createSsignDensity(" + sd + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public void updateSsignDensity(SsignDensity sd) {
    if (gSService == null) {
      System.out.println("Error in updateSsignDensity(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling updateSsignDensity(" + sd + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.updateSsignDensity(sd);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: updateSsignDensity(" + sd + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: updateSsignDensity(" + sd + ")");
      }
      e.printStackTrace();
    }
  }

  public void removeSsignDensity(int id) {
    if (gSService == null) {
      System.out.println("Error in removeSsignDensity(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling removeSsignDensity(" + id + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.removeSsignDensity(id);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: removeSsignDensity(" + id + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: removeSsignDensity(" + id + ")");
      }
      e.printStackTrace();
    }
  }

  public List findSsignDensityByPage(int start, int limit, String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findSsignDensityByPage(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findSsignDensityByPage(" + start + ", " + limit + ", " + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findSsignDensityByPage(start, limit, whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findSsignDensityByPage(" + start + ", " + limit + ", " + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findSsignDensityByPage(" + start + ", " + limit + ", " + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findSsignDensityByPage(" + start + ", " + limit + ", " + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public int getSsignDensityTotalNums(String whereStr) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in getSsignDensityTotalNums(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getSsignDensityTotalNums(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getSsignDensityTotalNums(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getSsignDensityTotalNums(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getSsignDensityTotalNums(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getSsignDensityTotalNums(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List findSsignDensity(String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findSsignDensity(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findSsignDensity(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findSsignDensity(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findSsignDensity(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findSsignDensity(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findSsignDensity(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List getProcessSpec(String transnum, String step, String map) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in getProcessSpec(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getProcessSpec(" + transnum + ", " + step + ", " + map + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getProcessSpec(transnum, step, map);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getProcessSpec(" + transnum + ", " + step + ", " + map + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getProcessSpec(" + transnum + ", " + step + ", " + map + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getProcessSpec(" + transnum + ", " + step + ", " + map + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public Float getProcessArea(String whereStr, spec after, spec beforeSpec) {
    Float returnValue = null;

    if (gSService == null) {
      System.out.println("Error in getProcessArea(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getProcessArea(" + whereStr + ", " + after + ", " + beforeSpec + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getProcessArea(whereStr, after, beforeSpec);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getProcessArea(" + whereStr + ", " + after + ", " + beforeSpec + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getProcessArea(" + whereStr + ", " + after + ", " + beforeSpec + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getProcessArea(" + whereStr + ", " + after + ", " + beforeSpec + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List getErpKaiMoList(String transnum) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in getErpKaiMoList(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getErpKaiMoList(" + transnum + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getErpKaiMoList(transnum);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getErpKaiMoList(" + transnum + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getErpKaiMoList(" + transnum + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getErpKaiMoList(" + transnum + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List findLikeSpec(String workflow, String map, String spec) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findLikeSpec(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findLikeSpec(" + workflow + ", " + map + ", " + spec + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findLikeSpec(workflow, map, spec);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findLikeSpec(" + workflow + ", " + map + ", " + spec + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findLikeSpec(" + workflow + ", " + map + ", " + spec + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findLikeSpec(" + workflow + ", " + map + ", " + spec + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public int createDefaultCheck(DefaultCheck dcheck) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in createDefaultCheck(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling createDefaultCheck(" + dcheck + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.createDefaultCheck(dcheck);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: createDefaultCheck(" + dcheck + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: createDefaultCheck(" + dcheck + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from createDefaultCheck(" + dcheck + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public void updateDefaultCheck(DefaultCheck dcheck) {
    if (gSService == null) {
      System.out.println("Error in updateDefaultCheck(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling updateDefaultCheck(" + dcheck + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.updateDefaultCheck(dcheck);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: updateDefaultCheck(" + dcheck + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: updateDefaultCheck(" + dcheck + ")");
      }
      e.printStackTrace();
    }
  }

  public void removeDefaultCheck(int id) {
    if (gSService == null) {
      System.out.println("Error in removeDefaultCheck(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling removeDefaultCheck(" + id + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.removeDefaultCheck(id);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: removeDefaultCheck(" + id + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: removeDefaultCheck(" + id + ")");
      }
      e.printStackTrace();
    }
  }

  public List findDefaultCheck(String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findDefaultCheck(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findDefaultCheck(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findDefaultCheck(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findDefaultCheck(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findDefaultCheck(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findDefaultCheck(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List findDefaultCheckByPage(int start, int limit, String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findDefaultCheckByPage(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findDefaultCheckByPage(" + start + ", " + limit + ", " + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findDefaultCheckByPage(start, limit, whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findDefaultCheckByPage(" + start + ", " + limit + ", " + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findDefaultCheckByPage(" + start + ", " + limit + ", " + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findDefaultCheckByPage(" + start + ", " + limit + ", " + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public int getDefaultCheckTotalNums(String whereStr) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in getDefaultCheckTotalNums(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getDefaultCheckTotalNums(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getDefaultCheckTotalNums(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getDefaultCheckTotalNums(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getDefaultCheckTotalNums(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getDefaultCheckTotalNums(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public Float getDefaultCheck(String whereStr, String spec) {
    Float returnValue = null;

    if (gSService == null) {
      System.out.println("Error in getDefaultCheck(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getDefaultCheck(" + whereStr + ", " + spec + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getDefaultCheck(whereStr, spec);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getDefaultCheck(" + whereStr + ", " + spec + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getDefaultCheck(" + whereStr + ", " + spec + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getDefaultCheck(" + whereStr + ", " + spec + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List getFactoryBySpec(String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in getFactoryBySpec(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getFactoryBySpec(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getFactoryBySpec(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getFactoryBySpec(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getFactoryBySpec(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getFactoryBySpec(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public int createQianDaoYield(QianDaoYield qdy) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in createQianDaoYield(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling createQianDaoYield(" + qdy + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.createQianDaoYield(qdy);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: createQianDaoYield(" + qdy + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: createQianDaoYield(" + qdy + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from createQianDaoYield(" + qdy + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public void removeQianDaoYield(int id) {
    if (gSService == null) {
      System.out.println("Error in removeQianDaoYield(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling removeQianDaoYield(" + id + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.removeQianDaoYield(id);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: removeQianDaoYield(" + id + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: removeQianDaoYield(" + id + ")");
      }
      e.printStackTrace();
    }
  }

  public void updateQianDaoYield(QianDaoYield qdy) {
    if (gSService == null) {
      System.out.println("Error in updateQianDaoYield(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling updateQianDaoYield(" + qdy + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.updateQianDaoYield(qdy);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: updateQianDaoYield(" + qdy + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: updateQianDaoYield(" + qdy + ")");
      }
      e.printStackTrace();
    }
  }

  public List findQianDaoYield(String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findQianDaoYield(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findQianDaoYield(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findQianDaoYield(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findQianDaoYield(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findQianDaoYield(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findQianDaoYield(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List findQianDaoYieldByPages(int start, int limit, String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findQianDaoYieldByPages(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findQianDaoYieldByPages(" + start + ", " + limit + ", " + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findQianDaoYieldByPages(start, limit, whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findQianDaoYieldByPages(" + start + ", " + limit + ", " + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findQianDaoYieldByPages(" + start + ", " + limit + ", " + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findQianDaoYieldByPages(" + start + ", " + limit + ", " + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public int getQianDaoYieldTotalNums(String whereStr) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in getQianDaoYieldTotalNums(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getQianDaoYieldTotalNums(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getQianDaoYieldTotalNums(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getQianDaoYieldTotalNums(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getQianDaoYieldTotalNums(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getQianDaoYieldTotalNums(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public GSCalcAction getGSCalc() {
    GSCalcAction returnValue = null;

    if (gSService == null) {
      System.out.println("Error in getGSCalc(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getGSCalc()");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getGSCalc();
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getGSCalc()");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getGSCalc()");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getGSCalc(): " + returnValue + ".");
    }
    return returnValue;
  }

  public List findProcessArea(String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findProcessArea(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findProcessArea(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findProcessArea(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findProcessArea(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findProcessArea(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findProcessArea(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public int createPeiFangPrice(PeiFangPrice pf) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in createPeiFangPrice(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling createPeiFangPrice(" + pf + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.createPeiFangPrice(pf);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: createPeiFangPrice(" + pf + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: createPeiFangPrice(" + pf + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from createPeiFangPrice(" + pf + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public void updatePeiFangPrice(PeiFangPrice pf) {
    if (gSService == null) {
      System.out.println("Error in updatePeiFangPrice(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling updatePeiFangPrice(" + pf + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.updatePeiFangPrice(pf);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: updatePeiFangPrice(" + pf + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: updatePeiFangPrice(" + pf + ")");
      }
      e.printStackTrace();
    }
  }

  public List findPeiFangPrice(String whereStr) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findPeiFangPrice(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findPeiFangPrice(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findPeiFangPrice(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findPeiFangPrice(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findPeiFangPrice(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findPeiFangPrice(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public List findPeiFangPriceByPages(String whereStr, int start, int limit) {
    List returnValue = null;

    if (gSService == null) {
      System.out.println("Error in findPeiFangPriceByPages(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling findPeiFangPriceByPages(" + whereStr + ", " + start + ", " + limit + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.findPeiFangPriceByPages(whereStr, start, limit);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: findPeiFangPriceByPages(" + whereStr + ", " + start + ", " + limit + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: findPeiFangPriceByPages(" + whereStr + ", " + start + ", " + limit + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from findPeiFangPriceByPages(" + whereStr + ", " + start + ", " + limit + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public int getPeiFangPriceTotalNums(String whereStr) {
    int returnValue = 0;

    if (gSService == null) {
      System.out.println("Error in getPeiFangPriceTotalNums(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling getPeiFangPriceTotalNums(" + whereStr + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.getPeiFangPriceTotalNums(whereStr);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: getPeiFangPriceTotalNums(" + whereStr + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: getPeiFangPriceTotalNums(" + whereStr + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from getPeiFangPriceTotalNums(" + whereStr + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public boolean storePeiFangPrice(String ssign, String factory, Float price, Date date1) {
    boolean returnValue = false;

    if (gSService == null) {
      System.out.println("Error in storePeiFangPrice(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling storePeiFangPrice(" + ssign + ", " + factory + ", " + price + ", " + date1 + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.storePeiFangPrice(ssign, factory, price, date1);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: storePeiFangPrice(" + ssign + ", " + factory + ", " + price + ", " + date1 + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: storePeiFangPrice(" + ssign + ", " + factory + ", " + price + ", " + date1 + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from storePeiFangPrice(" + ssign + ", " + factory + ", " + price + ", " + date1 + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public void removePeiFangPrice(int id) {
    if (gSService == null) {
      System.out.println("Error in removePeiFangPrice(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling removePeiFangPrice(" + id + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.removePeiFangPrice(id);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: removePeiFangPrice(" + id + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: removePeiFangPrice(" + id + ")");
      }
      e.printStackTrace();
    }
  }

  public boolean totalControl(Date dateFrom, Date dateTo) {
    boolean returnValue = false;

    if (gSService == null) {
      System.out.println("Error in totalControl(): " + ERROR_NULL_REMOTE);
      return returnValue;
    }

    long startTime = 0;
    if (logging) {
      log("Calling totalControl(" + dateFrom + ", " + dateTo + ")");
      startTime = System.currentTimeMillis();
    }

    try {
      returnValue = gSService.totalControl(dateFrom, dateTo);
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: totalControl(" + dateFrom + ", " + dateTo + ")");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: totalControl(" + dateFrom + ", " + dateTo + ")");
      }
      e.printStackTrace();
    }

    if (logging) {
      log("Return value from totalControl(" + dateFrom + ", " + dateTo + "): " + returnValue + ".");
    }
    return returnValue;
  }

  public void testLog() {
    if (gSService == null) {
      System.out.println("Error in testLog(): " + ERROR_NULL_REMOTE);
      return ;
    }

    long startTime = 0;
    if (logging) {
      log("Calling testLog()");
      startTime = System.currentTimeMillis();
    }

    try {
      gSService.testLog();
      if (logging) {
	long endTime = System.currentTimeMillis();
	log("Succeeded: testLog()");
	log("Execution time: " + (endTime - startTime) + " ms.");
      }
    }
    catch(Exception e) {
      if (logging) {
	log("Failed: testLog()");
      }
      e.printStackTrace();
    }
  }

  //----------------------------------------------------------------------------
  // Utility Methods
  //----------------------------------------------------------------------------

  private void log(String message) {
    if (message == null) {
      System.out.println("-- null");
      return ;
    }
    if (message.length() > MAX_OUTPUT_LINE_LENGTH) {
      System.out.println("-- " + message.substring(0, MAX_OUTPUT_LINE_LENGTH) + " ...");
    }
    else {
      System.out.println("-- " + message);
    }
  }
  //Main method

  public static void main(String[] args) {
    GSServiceTestClient3 client = new GSServiceTestClient3();
    // Use the client object to call one of the Home interface wrappers
    // above, to create a Remote interface reference to the bean.
    // If the return value is of the Remote interface type, you can use it
    // to access the remote interface methods.  You can also just use the
    // client object to call the Remote interface wrappers.
  }
}